APPNAME=server

LIBSPATH=`pwd`/../client/libs/

INCPATH=`pwd`/./inc/

SQLITE3PATH=${LIBSPATH}/install/include
SQLITE3LIBPATH=${LIBSPATH}/install/lib

CFLAGS=-I${LIBSPATH}
CFLAGS=-I${INCPATH}
CFLAGS+=-I${SQLITE3PATH}

LDFLAGS=-L${LIBSPATH} -l myserv
LDFLAGS+=-L${SQLITE3LIBPATH} -l sqlite3

CC=gcc

all:
	make -C src
	${CC} ${CFLAGS} server.c -o ${APPNAME} ${LDFLAGS}

clean:
	rm -f ${APPNAME}

run:
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBSPATH} && ./${APPNAME} -p 7777
